﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Nage.Algorithms.Solution;

namespace Nage.Algorithms.Population
{
    /// <summary>
    /// Population evaluator interface. When implemented, it provides 
    /// the measurement of fitness for all of the solutions in the population
    /// </summary>
    /// <typeparam name="TSol">Type of the solution</typeparam>
    public interface IPopulationEvaluator<TSol> 
        where TSol : ISolution
    {
        /// <summary>
        /// Evaluates the population by measuring fitness for all of the solutions in it
        /// </summary>
        /// <param name="population">population</param>
        /// <returns>evaluated population</returns>
        IPopulation<TSol> Evaluate(IPopulation<TSol> population);
    }
}
